
//
//  OrderFreeCell.m
//  DaJiang
//
//  Created by sally on 16/10/10.
//  Copyright © 2016年 jiniu. All rights reserved.
//

#import "OrderFreeCell.h"

@interface OrderFreeCell ()

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UIButton *selectBtn;

@end

@implementation OrderFreeCell

- (void)awakeFromNib {
}

- (void)setSelectBtnSelected:(BOOL)isSelected {
  self.selectBtn.selected = isSelected;
  if (self.selectBtn.isSelected) {
    self.timeLabel.textColor = GOrangeColor;
    self.addressLabel.textColor = GOrangeColor;
  } else {
    self.timeLabel.textColor = GBlackColor;
    self.addressLabel.textColor = GBlackColor;
  }
}

- (void)setOrderFreeType:(OrderFreeType)orderFreeType {
  _orderFreeType = orderFreeType;
  if (orderFreeType == OrderFreeType_Show) {
    self.selectBtn.hidden = YES;
  }else{
    self.selectBtn.hidden = NO;
  }
}

- (void)setCellOrderData:(OrderModel *)cellOrderData {
  self.timeLabel.text = [NSString stringWithFormat:@"时间：%@",cellOrderData.op_data.meet_time];
  self.addressLabel.text = [NSString stringWithFormat:@"地点：%@",cellOrderData.op_data.meet_location];
}

- (void)setCellData:(FreeModel *)cellData {
  self.timeLabel.text = [NSString stringWithFormat:@"时间：%@", cellData.data.time];
  self.addressLabel.text = [NSString stringWithFormat:@"地点：%@", cellData.data.location];
}

@end
